import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Login from '../views/Login.vue'
import ServiceSheet from '../views/ServiceSheet'
import Setting from '../views/Setting'
import Customer from '../views/Customer'
import ScadaMonitor from '../views/monitor/ScadaMonitor'
import Alarm from '../views/setting/Alarm'
import AlarmList from '../views/Alarm/AlarmList'
import Picture from '../views/monitor/Picture'
import RealData from '../views/monitor/RealData'
import HistoryData from '../views/monitor/HistoryData'
import Record from '../views/record/Record'
import DeviceManage from '../views/record/DeviceManage'
import DefectManage from '../views/record/DefectManage'
import Energy from '../views/energy/Energy'
import EnergyAir from '../views/energy/EnergyAir'
import EnergyAnalyze from '../views/energy/EnergyAnalyze'
import EnergyClassify from '../views/energy/EnergyClassify'
import EnergyLayered from '../views/energy/EnergyLayered'
import EnergyStandby from '../views/energy/EnergyStandby'
import EnergySummary from '../views/energy/EnergySummary'

Vue.use(VueRouter)

const routes = [
  {
    path: '/login',
    name: 'login',
    component: Login
  },
  { path: '/', component: Home },
  { path: '/scadamonitor', component: ScadaMonitor, name: '监控' },
  { path: '/setting/alarm', component: Alarm, name: '告警设置' },
  { path: '/alarmlist', component: AlarmList, name: '告警' },
  { path: '/scadamonitor/picture', component: Picture, name: '监控画面' },
  { path: '/scadamonitor/realdata', component: RealData, name: '实时数据' },
  { path: '/scadamonitor/historydata', component: HistoryData, name: '历史数据' },
  { path: '/record', component: Record, name: '档案' },
  { path: '/record/deviceManage', component: DeviceManage, name: '设备管理' },
  { path: '/record/defectManage', component: DefectManage, name: '缺陷管理' },
  { path: '/energy', component: Energy, name: '能耗管理' },
  { path: '/energy/energyAir', component: EnergyAir, name: '空调能耗' },
  { path: '/energy/energyAnalyze', component: EnergyAnalyze, name: '指标分析' },
  { path: '/energy/energyClassify', component: EnergyClassify, name: '分类分项' },
  { path: '/energy/energyLayered', component: EnergyLayered, name: '分层分区' },
  { path: '/energy/energyStandby', component: EnergyStandby, name: '待机能耗' },
  { path: '/energy/energySummary', component: EnergySummary, name: '能耗汇总' },
  {
    path: '/servicesheet',
    component: ServiceSheet
  },
  {
    path: '/setting',
    component: Setting
  },
  {
    path: '/customer',
    component: Customer
  },
  {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  }
]

const router = new VueRouter({
  routes
})

export default router
